#coding:utf-8
"""
*   Coder    : Dzlua
*   Email    : 505544956@qq.com
*   Time     : 2017/09/28
"""
#--------------------#
import config
from app import create_app
from app.models import install_models
from flask_script import Manager, Command

#--------------------#
app = create_app(config)
manager = Manager(app)

#--------------------#
class Install(Command):
    '''install database'''
    def run(self):
        print('install...')
        install_models()
        print('install done!')
#
manager.add_command('install', Install)

#--------------------#
if __name__ == '__main__':
    manager.run()
#--------------------#
